package cn.nfwx.tv.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class DateProgram implements Parcelable{
    private String date;
    private List<TvProgram> TvPrograms;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public List<TvProgram> getTvPrograms() {
        return TvPrograms;
    }

    public void setTvPrograms(List<TvProgram> TvPrograms) {
        this.TvPrograms = TvPrograms;
    }

    public DateProgram() {
    }

    protected DateProgram(Parcel in) {
        date = in.readString();
        TvPrograms = in.createTypedArrayList(TvProgram.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(date);
        dest.writeTypedList(TvPrograms);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DateProgram> CREATOR = new Creator<DateProgram>() {
        @Override
        public DateProgram createFromParcel(Parcel in) {
            return new DateProgram(in);
        }

        @Override
        public DateProgram[] newArray(int size) {
            return new DateProgram[size];
        }
    };
}
